<!DOCTYPE html>
<html>
<head>
    <title>#{get 'title' /}</title>
    <meta charset="utf-8"/>
    <meta name="description" content="&{'Views.master.meta.description'}"/>
    <meta name="keywords" content="&{'Views.master.meta.keywords'}"/>
    <meta name="viewport" content="width=800"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-touch-fullscreen" content="yes"/>
    <link rel="shortcut icon" href="@{'/public/images/favicon.png'}"/>
    <link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/main.css'}"/>
#{get 'moreStyles' /}
</head>

<body>
<div class="login-link">
    <a href="@{ShoppingCart.display}">&{'TopMenu.shoppingCart'}</a> <span class="topmenu-separator">|</span>
#{if !session.contains("username")}
    <a href="@{Secure.login}">&{'LoginControl.login'}</a>
#{/if}
#{else}
    <a href="@{Secure.logout}">&{'LoginControl.logout'}</a>
%{user = models.helpers.UserHelper.getUser(session)}%
    #{if user.isAdmin}
        <span class="topmenu-separator">|</span>
        <a href="@{Admin.home}">&{'LoginControl.admin'}</a>
    #{/if}
#{/else}
</div>

<div class="main-menu">
    <ul>
        <li id="homeItem" class="#{get 'isHomeActive' /}"><a href="/">&{'MainMenu.home'}</a></li>
        <li class="#{get 'isCatalogActive' /}"><a href="@{Product.categoryList}">&{'MainMenu.catalog'}</a></li>
        <li class="#{get 'isAboutActive' /}"><a href="@{Shop.about}">&{'MainMenu.about'}</a></li>
        <li class="#{get 'isContactsActive' /}"><a href="@{Shop.contacts}">&{'MainMenu.contacts'}</a></li>
    </ul>
    <form class="search-form" action="@{Product.search()}" method="GET">
        <input type="text" name="q"/>
        <input type="submit" value="&{'Master.searchButton'}"/>
    </form>
</div>


<div id="content" class="body">
#{doLayout /}
</div>

<div id="footer" class="body">
    <div class="footer_inner">
        <p>

        <div>&{'Footer.phoneNumber'}</div>
    &{'Footer.copyright'}
        </p>
    </div>
</div>
<script src="@{'/public/javascripts/jquery-1.7.1.min.js'}" type="text/javascript" charset="utf-8"></script>
#{get 'moreScripts' /}
#{get 'fixStyles' /}
</body>
</html>